package io.netty.channel;


import io.netty.util.IntSupplier;

/**
 * Default select strategy.
 */
final class DefaultSelectStrategy implements SelectStrategy {

    static final DefaultSelectStrategy INSTANCE = new DefaultSelectStrategy();

    private DefaultSelectStrategy() {

    }

    @Override
    public int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception {
        return hasTasks ? selectSupplier.get() : SELECT;
    }
}
